package com.cskaoyan._08call;

import java.util.Arrays;

/**
 * @description:
 * @author: 景天
 * @date: 2023/2/2 11:45
 **/

public class Demo3 {
    public static void main(String[] args) {
        //定义引用数据类型
        int[] arr = {1, 1, 1};
        System.out.println("调用test之前:");
        System.out.println("main---"+ Arrays.toString(arr));

        test(arr);

        System.out.println("调用test之后:");
        System.out.println("main---"+ Arrays.toString(arr));



    }

    public static void test(int[] arr) {
        for (int i = 0; i < arr.length; i++) {
            arr[i] *= 2;
        }
        System.out.println("test---"+ Arrays.toString(arr));

    }
}
